<include file="public:header" />
<div class="allpagetop">系统设置<strong>/</strong>地图</div>
<div class="admin_main_nr_dbox">
<div class="pagetit">
	        <div class="ptit">系统设置</div>
				<include file="Config/topnav" /> 
	        <div class="clear"></div>
	    </div>
		
		
    <div class="toptit">百度地图配置</div>
  <form action="{:RU('config/edit')}" method="post"   name="FormData" id="FormData" >
	  <div class="admin_form_main">
	  
		<div class="fl">地图AK:</div>
		<div class="fr">
		 			<input name="UU_MAP_AK" type="text"  class="input_text_default" maxlength="300" placeholder="地图AK请从百度地图官方获取" value="{$show.UU_MAP_AK}"/>
		</div>
		
		<div class="fl">X坐标:</div>
		<div class="fr">
		 			<input name="UU_MAP_X" type="text"  class="input_text_default" maxlength="300" placeholder="拖动地图自动生成" value="{$show.UU_MAP_X}"  id="map_x"/>
		</div>
	 
<div class="fl">Y坐标:</div>
		<div class="fr">
		 			<input name="UU_MAP_Y" type="text"  class="input_text_default" maxlength="300" placeholder="拖动地图自动生成" value="{$show.UU_MAP_Y}" id="map_y"/>
		</div>
<div class="fl">缩放级别:</div>
		<div class="fr">
		 			<input name="UU_MAP_ZOOM" type="text"  class="input_text_default" maxlength="300" placeholder="拖动地图自动生成" value="{$show.UU_MAP_ZOOM}" id="map_zoom"/>
		</div>
	 
	 
		
  <div class="fl"></div>
		<div class="fr">
		  <div style="width:680px;height:200px; border:1px #CCCCCC solid;border-radius:6px;" id="container"></div>
		</div>
	 
		
		 <div class="fl"></div>
		<div class="fr">
		<input name="" type="submit" class="admin_submit big"    value="保存配置"/>
		</div>
		
		
		
		<div class="clear"></div>
		
	  </div>
  
  
 
  
  
   
  </form>
</div>
<include file="public:footer" />
<script src="http://api.map.baidu.com/api?v=1.2" type="text/javascript"></script>
<script type="text/javascript">
	var map = new BMap.Map("container");       // 创建地图实例   
	var point = new BMap.Point({:C('UU_MAP_X')},{:C('UU_MAP_Y')});  // 创建点坐标   
	map.centerAndZoom(point, {:C('UU_MAP_ZOOM')}); 
	map.addControl(new BMap.NavigationControl());   
	map.addEventListener("moveend", function(){   
	var center = map.getCenter();
	document.getElementById("map_x").value=center.lng; 
	document.getElementById("map_y").value= center.lat; 
	document.getElementById("map_zoom").value=map.getZoom();
});   
</script>
</body>
</html>